<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/bootstrap.css">
	<link rel="stylesheet"
	href="<%=request.getContextPath()%>/css/jquery-ui.min.css">
	<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery.js"></script>
	<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery-ui.min.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/bootstrap.js"></script>
	<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/jquery.form.js"></script>
	<style type="text/css">
	thead td{
	 color:blue;
	 font-weight: bold;
	 font-size: 20px;
	}
	.title{
	 color:blue;
	 font-weight: bold;
	}
	</style>
<title>GSS Web Service</title>
</head>
<body style="margin-left: 50px">
<h1>Welcome to GSS API</h1>
	<div class="table-responsive" id="apilist">
	<h3>authenticateUser</h3>
	<div>
		<table class="table table-condensed" width="800">
			<caption><h2> GSS API ---- authenticateUser</h2></caption><br><br>
			<thead>
				<tr>
				<td width="5%">No</td>
				<td width="25%">Name</td>
				<td width="35%">Input</td>
				<td width="35%">Output</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="title">No.1</td>
					<td>authenticateUser<br>/partyAuthentication/authenticateUser</td>
					<td>
						<form id="form1">
							<div class="form-group">
								<label for="name">BankID</label> <input type="text"
									class="form-control" id="form1BankID" name="bankID" placeholder="BankID" value="MT0001">
							</div>
							 	<div class="form-group">
								<label for="name">ClientID</label> <input type="text"
									class="form-control" id="form1ClientID"  name="clientID" placeholder="ClientID" value="fintaro">
							</div>
								<div class="form-group">
								<label for="name">ClientSecret</label> <input type="password"
									class="form-control" id="form1ClientSecret" name="clientSecret" placeholder="ClientSecret" value="pswfintaro">
							</div>
								<div class="form-group">
								<label for="name">PartyID</label> <input type="text"
									class="form-control" id="form1PartyID" name="partyID" placeholder="PartyID" value="taro">
							</div>
								<div class="form-group">
								<label for="name">Password</label> <input type="password"
									class="form-control" id="form1Password" name="password" placeholder="Password" value="pswtaro">
							</div>
								<div class="form-group">
								<label for="name">AdditionalAuthenticationCode</label> <input type="text"
									class="form-control" id="form1AdditionalAuthenticationCode"  name="additionalAuthenticationCode" placeholder="AdditionalAuthenticationCode"><br>
									<img id="verifyCodeImage" alt="" src="verifyCodeImage/fintaro">
							</div>
							<div  class="btn btn-default" id="form1btn1">submit</div>  
						</form>
					</td>
					<td><div id="form1result">Authorization:   <span id="resAuthorization" style="color: red"></span></div><br><br><br><div style="width: 500px;overflow: scroll;color: blue" id="1resultall"></div></td>
				</tr>
				</tbody>
				</table>
				</div>
				<h3>authorizeAction</h3>
	            <div>
				<table class="table table-condensed" width="800">
			<caption><h2>GSS API  ---- authorizeAction</h2></caption><br><br>
			<thead>
				<tr>
				<td width="5%">No</td>
				<td width="25%">Name</td>
				<td width="35%">Input</td>
				<td width="35%">Output</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="title">No.2</td>
					<td>authorizeAction<br>/TransactionAuthentication/authorizeAction</td>
					<td>
						<form id="form2">
							<div class="form-group">
								<label for="name">ActionCode</label> <input type="text"
									class="form-control" id="form2ActionCode" placeholder="ActionCode" name="actionCode" value="TRAN">
							</div>
							 	<div class="form-group">
								<label for="name">ClientID</label> <input type="text"
									class="form-control" id="form2ClientID" placeholder="ClientID" name="clientID" value="fintaro">
							</div>
								<div class="form-group">
								<label for="name">PartyID</label> <input type="text"
									class="form-control" id="form2PartyID" placeholder="PartyID" name="partyID" value="taro">
							</div>
								<div class="form-group">
								<label for="name">Authorization</label> <input type="Authorization"
									class="form-control" id="form2Authorization" placeholder="Authorization" name="authorization">
							</div>
								 
							<div  class="btn btn-default" id="form2btn1">submit</div>  
						</form>
					</td>
					<td style="color: red">PartyID:<span style="color: red" id="2resPartyID"></span><br>Authorization2:<span style="color: red" id="2resAuthorization2"></span><br><br><br><div style="width: 500px;overflow: scroll;color: blue" id="2resultall"></div></td>
				</tr>
				</tbody></table>
				</div>
				<h3>queryCurrentAccount</h3>
	            <div>
					<table class="table table-condensed" width="800">
			<caption><h2>GSS API  ---- queryCurrentAccount</h2></caption><br><br>
			<thead>
				<tr>
				<td width="5%">No</td>
				<td width="25%">Name</td>
				<td width="35%">Input</td>
				<td width="35%">Output</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="title">No.3</td>
					<td>queryCurrentAccount<br>/CurrentAccount/queryCurrentAccount</td>
					<td>
						<form id="form3">
							 <div class="form-group">
								<label for="name">ClientID</label> <input type="text"
									class="form-control" id="form3ClientID" placeholder="ClientID" name="clientID" value="fintaro">
							</div>
							<div class="form-group">
								<label for="name">PartyID</label> <input type="text"
									class="form-control" id="form3PartyID" placeholder="PartyID" name="partyID" value="taro">
							</div>
								<div class="form-group">
								<label for="name">Authorization</label> <input type="Authorization"
									class="form-control" id="form3Authorization" placeholder="Authorization" name="authorization">
							</div>
								 <div class="form-group">
								<label for="name">Authorization2</label> <input type="text"
									class="form-control" id="form3Authorization2" placeholder="Authorization2" name="authorization2">
							</div>
							<div  class="btn btn-default" id="form3btn1">submit</div>  
						</form>
					</td>
					<td><br><br><br><span style="color: red" id="3result"></span><br><br><br><div id="3resultall" style="width: 500px;overflow: scroll;color: blue"></div></td>
				</tr>
				</tbody></table>
				</div>
				<h3>getAccountBalance</h3>
	            <div>
				<table class="table table-condensed" width="800">
			<caption><h2>GSS API  ---- getAccountBalance</h2></caption><br><br>
			<thead>
				<tr>
				<td width="5%">No</td>
				<td width="25%">Name</td>
				<td width="35%">Input</td>
				<td width="35%">Output</td>
				</tr>
			</thead>
			<tbody>
					<tr>
					<td class="title">No.4</td>
					<td>getAccountBalance<br>/CurrentAccount/getAccountBalance</td>
					<td>
						<form id="form4">
							 <div class="form-group">
								<label for="name">ClientID</label> <input type="text"
									class="form-control" id="form4ClientID" placeholder="ClientID" name="clientID" value="fintaro">
							</div>
							<div class="form-group">
								<label for="name">PartyID</label> <input type="text"
									class="form-control" id="form4PartyID" placeholder="PartyID" name="partyID" value="taro">
							</div>
								<div class="form-group">
								<label for="name">BankID</label> <input type="text"
									class="form-control" id="form4BankID" name="bankID" placeholder="BankID" value="MT0001">
							</div>
							<div class="form-group">
								<label for="name">BranchID</label> <input type="text"
									class="form-control" id="form4BranchID" name="branchID" placeholder="BranchID" value="012">
							</div>
							<div class="form-group">
								<label for="name">AccountID</label> <input type="text"
									class="form-control" id="form4AccountID" name="accountID" placeholder="AccountID" value="012001">
							</div>
							
								<div class="form-group">
								<label for="name">Authorization</label> <input type="Authorization"
									class="form-control" id="form4Authorization" placeholder="Authorization" name="authorization">
							</div>
								 <div class="form-group">
								<label for="name">Authorization2</label> <input type="text"
									class="form-control" id="form4Authorization2" placeholder="Authorization2" name="authorization2">
							</div>
								 
							<div  class="btn btn-default" id="form4btn1">submit</div>  
						</form>
					</td>
					<td><br><br><br><span style="color: red" id="4result"></span><br><br><br><div id="4resultall" style="width: 500px;overflow: scroll;color: blue"></div></td>
				</tr>
				</tbody></table>
				</div>
					<h3>getTransactionHistory</h3>
	            <div>
				<table class="table table-condensed" width="800">
			<caption><h2>GSS API  ---- getTransactionHistory</h2></caption><br><br>
			<thead>
				<tr>
				<td width="5%">No</td>
				<td width="25%">Name</td>
				<td width="35%">Input</td>
				<td width="35%">Output</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="title">No.5</td>
					<td>getTransactionHistory<br>/PositionKeeping/getTransactionHistory</td>
					<td>
						<form id="form5">
							 <div class="form-group">
								<label for="name">ClientID</label> <input type="text"
									class="form-control" id="form5ClientID" placeholder="ClientID" name="clientID" value="fintaro">
							</div>
							<div class="form-group">
								<label for="name">PartyID</label> <input type="text"
									class="form-control" id="form5PartyID" placeholder="PartyID" name="partyID" value="taro">
							</div>
								<div class="form-group">
								<label for="name">BankID</label> <input type="text"
									class="form-control" id="form5BankID" name="bankID" placeholder="BankID" value="MT0001">
							</div>
							<div class="form-group">
								<label for="name">BranchID</label> <input type="text"
									class="form-control" id="form5BranchID" name="branchID" placeholder="BranchID" value="012">
							</div>
							<div class="form-group">
								<label for="name">AccountID</label> <input type="text"
									class="form-control" id="form5AccountID" name="accountID" placeholder="AccountID" value="012001">
							</div>
							<div class="form-group">
								<label for="name">Account Type</label> <input type="text"
									class="form-control" id="form5AccountType" name="accountType" placeholder="AccountType" value="普通預金">
							</div>
								<div class="form-group">
								<label for="name">Authorization</label> <input type="Authorization"
									class="form-control" id="form5Authorization" placeholder="Authorization" name="authorization">
							</div>
								 <div class="form-group">
								<label for="name">Authorization2</label> <input type="text"
									class="form-control" id="form5Authorization2" placeholder="Authorization2" name="authorization2">
							</div>
								 <div class="form-group">
								<label for="name">From Date</label> <input type="date"
									class="form-control" id="form5FromDate" placeholder="From Date" name="fromDate" value="2015-12-01">
							</div>
								 <div class="form-group">
								<label for="name">To Date</label> <input type="text"
									class="form-control" id="form5ToDate" placeholder="To Date" name="toDate" value="2015-12-30">
							</div>
								 <div class="form-group">
								<label for="name">Limit</label> <input type="text"
									class="form-control" id="form5Limit" placeholder="Limit" name="limit" value="10">
							</div>
								 <div class="form-group">
								<label for="name">Order By</label> <input type="text"
									class="form-control" id="form5OrderBy" placeholder="ASC/DESC" name="orderBy" value="ASC">
							</div>
							<div  class="btn btn-default" id="form5btn1">submit</div>  
						</form>
					</td>
					<td><br><br><br><span style="color: red" id="5result"></span><br><br><br><div id="5resultall" style="width: 500px;overflow: scroll;color: blue"></div></td>
				</tr>
				</tbody></table>
				</div>
				
				<h3>transferFunds</h3>
	            <div>
				<table class="table table-condensed" width="800">
			<caption><h2>GSS API  ---- transferFunds</h2></caption><br><br>
			<thead>
				<tr>
				<td width="5%">No</td>
				<td width="25%">Name</td>
				<td width="35%">Input</td>
				<td width="35%">Output</td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td class="title">No.6</td>
					<td>transferFunds<br>/CurrentAccount/transferFunds</td>
					<td>
						<form id="form6">
							 <div class="form-group">
								<label for="name">ClientID</label> <input type="text"
									class="form-control" id="form6ClientID" placeholder="ClientID" name="clientID" value="fintaro">
							</div>
							<div class="form-group">
								<label for="name">PartyID</label> <input type="text"
									class="form-control" id="form6PartyID" placeholder="PartyID" name="partyID" value="taro">
							</div>
								<div class="form-group">
								<label for="name">BankID</label> <input type="text"
									class="form-control" id="form6BankID" name="bankID" placeholder="BankID" value="MT0001">
							</div>
							<div class="form-group">
								<label for="name">BranchID</label> <input type="text"
									class="form-control" id="form6BranchID" name="branchID" placeholder="BranchID" value="011">
							</div>
							<div class="form-group">
								<label for="name">AccountID</label> <input type="text"
									class="form-control" id="form6AccountID" name="accountID" placeholder="AccountID" value="012001">
							</div>
							<div class="form-group">
								<label for="name">Account Type</label> <input type="text"
									class="form-control" id="form6AccountType" name="accountType" placeholder="Account Type" value="普通預金">
							</div>
								<div class="form-group">
								<label for="name">Currency</label> <input type="text"
									class="form-control" id="form6Currency" name="currency" placeholder="Currency" value="01">
							</div>
								<div class="form-group">
								<label for="name">Amount</label> <input type="text"
									class="form-control" id="form6Amount" name="amount" placeholder="Amount" value="10000">
							</div>
							<!--to bank  -->
							<div class="form-group">
								<label for="name">To BankID</label> <input type="text"
									class="form-control" id="form6ToBankID" name="toBankID" placeholder="To BankID" value="MT0001">
							</div>
							<div class="form-group">
								<label for="name">To BranchID</label> <input type="text"
									class="form-control" id="form6ToBranchID" name="toBranchID" placeholder="To BranchID" value="012">
							</div>
							<div class="form-group">
								<label for="name">To AccountID</label> <input type="text"
									class="form-control" id="form6ToAccountID" name="toAccountID" placeholder="to Account ID" value="012002">
							</div>
							<div class="form-group">
								<label for="name">To Account Type</label> <input type="text"
									class="form-control" id="form6ToAccountType" name="toAccountType" placeholder="To Account Type" value="普通預金">
							</div>
							<div class="form-group">
								<label for="name">To Account Kana</label> <input type="text"
									class="form-control" id="form6ToAccountKana" name="toAccountKana" placeholder="to Account Kana" value="ヤマダタロウ">
							</div>
								<div class="form-group">
								<label for="name">Description</label> <input type="text"
									class="form-control" id="form6Description" name="description" placeholder="Description" value="">
							</div>
							<div class="form-group">
								<label for="name">TransactionDate</label> <input type="date"
									class="form-control" id="form6TransactionDate" placeholder="TransactionDate" name="transactionDate" value="2016-01-05">
							</div>
								<div class="form-group">
								<label for="name">Authorization</label> <input type="Authorization"
									class="form-control" id="form6Authorization" placeholder="Authorization" name="authorization">
							</div>
						    <div class="form-group">
								<label for="name">Authorization2</label> <input type="text"
									class="form-control" id="form6Authorization2" placeholder="Authorization2" name="authorization2">
							</div>
							<div  class="btn btn-default" id="form6btn1">submit</div>  
						</form>
					</td>
					<td><br><br><br><span style="color: red" id="6result"></span><br><br><br><div id="6resultall" style="width: 500px;overflow: scroll;color: blue"></div></td>
				</tr>
			</tbody>
		</table></div>
	</div>
	<!--script-------------------------------------------------------------------  -->
	<script type="text/javascript">
	//var contextroot="http://localhost:8080/GSS";
	var contextroot="http://btmu.mybluemix.net";
	$(document).ready(function(){
		 var icons = {
			      header: "ui-icon-circle-arrow-e",
			      activeHeader: "ui-icon-circle-arrow-s"
			    };
		$("#apilist").accordion({collapsible:false,
			event:'click',
			fillSpace:true,heightStyle: 'content',widthStyle:'content',active: false,
			collapsible: true ,icons:  icons  });
		 
		//================================no1==============================================	 
		$("#form1ClientID").blur(function(){
			var clientid =$("#form1ClientID").val();
			var date = new Date().toUTCString();
			$("#verifyCodeImage").attr("src","verifyCodeImage/"+clientid+"?version="+date);
		});
		 $("#form1btn1").click(function(){
			 var url="/partyAuthentication/authenticateUser";
			 var BankID =$("#form1BankID").val();
			 var ClientID=$("#form1ClientID").val();
			 var ClientSecret=$("#form1ClientSecret").val();
			 var PartyID=$("#form1PartyID").val();
			 var Password=$("#form1Password").val();
			 var AdditionalAuthenticationCode=$("#form1AdditionalAuthenticationCode").val();
			 var param = new Object();
			 param.bankID=BankID;
			 param.clientID=ClientID;
			 param.clientSecret=ClientSecret;
			 param.partyID=PartyID;
			 param.password=Password;
			 param.additionalAuthenticationCode=AdditionalAuthenticationCode;
			 var oo = {};
			 oo.url=url;
			 oo.params=JSON.stringify(param);
			
			 oo.success=function(data){
				 $("#resAuthorization").empty();
				 $("#1resultall").empty();
				 var token1=data.data.authorization;
				 $("#resAuthorization").append(token1);
				 $("#1resultall").append(JSON.stringify(data));
				 
				 $("input[name='authorization']").attr('value',token1);
			 };
			 oo.error=function(){
				 alert("request error, please try again later");
			 }
			 sendRequest(oo);
		 });
			//================================no2==============================================	 
		 $("#form2btn1").click(function(){
			 var url="/TransactionAuthentication/authorizeAction";
			 var BankID =$("#form2ActionCode").val();
			 var ClientID=$("#form1ClientID").val();
			 var ClientSecret=$("#form1ClientSecret").val();
			 var PartyID=$("#form1PartyID").val();
			 var Password=$("#form1Password").val();
			 var AdditionalAuthenticationCode=$("#form1AdditionalAuthenticationCode").val();
			 var param = new Object();
			 param.actionCode=$("#form2ActionCode").val();
			 param.partyID=$("#form2PartyID").val();
			 param.clientID=$("#form2ClientID").val();
			 param.authorization=$("#form2Authorization").val();
			 
			 
			 var oo = {};
			 oo.url=url;
			 oo.params=JSON.stringify(param);
			 $("#2resultall").empty();
			 $("#2resPartyID").empty();
			 $("#2resAuthorization2").empty();
			 oo.success=function(data){
				 $("#2resultall").append(JSON.stringify(data));
				 $("#2resPartyID").append(data.data.partyID);
				 var token2=data.data.authorization2;
				 $("#2resAuthorization2").append(token2);
				 $("input[name='authorization2']").attr('value',token2);
				
			 };
			 oo.error=function(){
				 alert("request error, please try again later");
			 }
			 sendRequest(oo);
		 });
		 
	//================================no3==============================================	 
		 $("#form3btn1").click(function(){
			 var url="/CurrentAccount/queryCurrentAccount";
 			 var param = new Object();
			 
			 param.partyID=$("#form3PartyID").val();
			 param.authorization2=$("#form3Authorization2").val();
			 param.authorization=$("#form3Authorization").val();
			 param.clientID=$("#form3ClientID").val();
			 var oo = {};
			 oo.url=url;
			 oo.params=JSON.stringify(param);
			 oo.success=function(data){
				 $("#3result").empty();
				 $("#3resultall").empty();
				 $("#3resultall").append(JSON.stringify(data));
				 var dataresult=data.data.accountlist;
				 var count=data.data.count;
				 var length=dataresult.length;
				 var tempitem="No.Of Account :"+count +"<BR><BR>";
				 $("#3result").append(tempitem);
				 for(var i=0;i<length;i++){
					var oneitem= "BANK ID:"+dataresult[i].BANKID+
					                "<BR>BRANCH ID:"+dataresult[i].BRANCHID+
					                "<BR>ACCOUNT ID:"+dataresult[i].ACCOUNTID+
					                "<BR>ACCOUNT TYPE:"+dataresult[i].ACCOUNTTYPE+
					                "<BR>-------------------------------------<BR><BR>";
					 
					 $("#3result").append(oneitem);
				 }
			 };
			 oo.error=function(){
				 alert("request error, please try again later");
			 }
			 sendRequest(oo);
		 });
	
		//================================no4==============================================	 
		 $("#form4btn1").click(function(){
			 var url="/CurrentAccount/getAccountBalance";
 			 var param = new Object();
 			 param.clientID=$("#form4ClientID").val();
			 param.partyID=$("#form4PartyID").val();
			 param.authorization2=$("#form4Authorization2").val();
			 param.authorization=$("#form4Authorization").val();
			 param.bankID=$("#form4BankID").val();
			 param.branchID=$("#form4BranchID").val();
			 param.accountID=$("#form4AccountID").val();
			 
			 param.fromDate=$("#form4FromDate").val();
			 param.toDate=$("#form4ToDate").val();
			 param.orderBy=$("#form4OrderBy").val();
			 param.limit=$("#form4Limit").val();
			 var oo = {};
			 oo.url=url;
			 oo.params=JSON.stringify(param);
			 oo.success=function(data){
				 $("#4result").empty();
				 $("#4resultall").empty();
				 
				 $("#4resultall").append(JSON.stringify(data));
				 if(data.ErrorCode=='00'){
					 var result=data.data;
					 var length=result.length;
						// alert(result);
						  // for(var i=0;i<length;i++){
							 var tempitem = "Party ID:   "+result.PARTYID+
							                "<BR>Branch ID:   "+result.BRANCHID+
							                "<BR>Account ID:   "+result.ACCOUNTID+
							                "<BR>Current Amount:   "+result.CURRENTAMOUNT+
							                "<BR>Available Amount:   "+result.AVAILABLEAMOUNT+
							                "<BR>Currency:   "+result.CURRENCY+
							                "<BR>EffectiveDate:   "+result.EFFECTIVEDATE;
							 $("#4result").append(tempitem);
						// } 
				 }
				
				
			 };
			 oo.error=function(){
				 alert("request error, please try again later");
			 }
			 sendRequest(oo);
		 });
		
			//================================no5==============================================	 
		 $("#form5btn1").click(function(){
			 var url="/PositionKeeping/getTransactionHistory";
 			 var param = new Object();
 			 param.clientID=$("#form5ClientID").val();
			 param.partyID=$("#form5PartyID").val();
			 param.authorization2=$("#form5Authorization2").val();
			 param.authorization=$("#form5Authorization").val();
			 param.bankID=$("#form5BankID").val();
			 param.branchID=$("#form5BranchID").val();
			 param.accountID=$("#form5AccountID").val();
			 param.accountType=$("#form5AccountType").val();
			 param.fromDate=$("#form5FromDate").val();
			 param.toDate=$("#form5ToDate").val();
			 param.orderBy=$("#form5OrderBy").val();
			 param.limit=$("#form5Limit").val();
			 var oo = {};
			 oo.url=url;
			 oo.params=JSON.stringify(param);
			 oo.success=function(data){
				 $("#5result").empty();
				 $("#5resultall").empty();			 
				 $("#5resultall").append(JSON.stringify(data));
				 
				 if(data.ErrorCode=='00'){
					 var result=data.data;
					 var listresult=data.data.list;
					 var length=listresult.length;
				     var tempitem0= "<BR>Branch ID:    "+result.branchID+
		                            "<BR>Account ID:   "+result.accountID+
				                    "<BR>Account Type: "+result.acountType;
				        $("#5result").append(tempitem0);
				        var tempitem1="<BR>No.Of Items: "+result.count;
				        $("#5result").append(tempitem1);
						   for(var i=0;i<length;i++){
							 var tempitem2 ="<BR>-----------------------------------"+
							                "<BR>Transaction ID:   "+listresult[i].TRANSACTIONID+
							                "<BR>Type:   "+listresult[i].TYPE+
							                "<BR>PostedDate:   "+listresult[i].POSTEDDATE+
							                "<BR>Description:   "+listresult[i].DESCRIPTION+
							                "<BR>Transaction Amount:   "+listresult[i].TRANSACTIONAMOUNT+"/ Currency:  "+listresult[i].TRANSACTIONCURRENCY+
							                "<BR>OldBalance Amount:   "+listresult[i].BALANCEBEFORE+" / Currency: "+listresult[i].BALANCECURRENCYBEFORE+
							                "<BR>NewBalance Amount:   "+listresult[i].BALANCEAFTER+" / Currency: "+listresult[i].BALANCECURRENCYAFTER+
							                "<BR>-----------------------------------";
							              
							 $("#5result").append(tempitem2);
						 } 
				 }
				
				
			 };
			 oo.error=function(){
				 alert("request error, please try again later");
			 }
			 sendRequest(oo);
		 });
			
		//================================no6==============================================	 
		 $("#form6btn1").click(function(){
			 var url="/CurrentAccount/transferFunds";
 			 var param = new Object();
 			 param.clientID=$("#form6ClientID").val();
			 param.partyID=$("#form6PartyID").val();
			 param.bankID=$("#form6BankID").val();
			 param.branchID=$("#form6BranchID").val();
			 param.accountID=$("#form6AccountID").val();
			 param.branchID=$("#form6Currency").val();
			 param.accountID=$("#form6Amount").val();
			 param.authorization2=$("#form6Authorization2").val();
			 param.authorization=$("#form6Authorization").val();
			 
			 param.clientID=$("#form6ClientID").val();
			 param.partyID=$("#form6PartyID").val();
			 param.bankID=$("#form6BankID").val();
			 param.branchID=$("#form6BranchID").val();
			 param.accountID=$("#form6AccountID").val();
			 param.accountType=$("#form6AccountType").val();
			 param.currency=$("#form6Currency").val();
			 
			 param.toBankID=$("#form6ToBankID").val();
			 param.toBranchID=$("#form6ToBranchID").val();
			 param.toAccountID=$("#form6ToAccountID").val();
			 param.toAccountType=$("#form6ToAccountType").val();
			 param.toAccountKana=$("#form6ToAccountKana").val();
			 param.description=$("#form6Description").val();
			 param.transactionDate=$("#form6TransactionDate").val();
			 param.authorization=$("#form6Authorization").val();
			 param.authorization2=$("#form6Authorization2").val();
			 var oo = {};
			 oo.url=url;
			 oo.params=JSON.stringify(param);
			 oo.success=function(data){
				 $("#6result").empty();
				 $("#6resultall").empty();
				 
				 $("#6resultall").append(JSON.stringify(data));
				 if(data.ErrorCode=='00'){
					 var result=data.data;
					 var length=result.length;
						// alert(result);
						   for(var i=0;i<length;i++){
							 var tempitem = "<BR>Transaction ID:   "+result[i].TRANSACTIONID+
							                 "<BR>TransactionDate:   "+result[i].TRANSACTIONDATE+
							                "<BR>BranchID:   "+result[i].BRANCHID+
							                "<BR>AccountID:   "+result[i].ACCOUNTID+
							                "<BR>Account Type:   "+result[i].ACCOUNTTYPE+
							                "<BR>To BranchID:   "+result[i].TOBRANCHID+
							                "<BR>To AccountID:   "+result[i].TOACCOUNTID+
							                "<BR>To Account Type:   "+result[i].TOACCOUNTTYPE+
							                "<BR>To Account KANA:   "+result[i].TOACCOUNTKANA+
							                "<BR>Currency :   "+result[i].CURRENCY+
							                "<BR>TRANSACTION FEE :   "+result[i].TRANSACTIONFEE+
							                "<BR>-----------------------------------"
							                "<BR>-----------------------------------"
							 $("#6result").append(tempitem);
						 } 
				 }
				
				
			 };
			 oo.error=function(){
				 alert("request error, please try again later");
			 }
			 sendRequest(oo);
		 });
	 });
	
	
	function sendRequest(oo) {
	 
		$.ajax({
			type : 'post',
			contentType : "application/json; charset=utf-8",
			dataType : 'json',
			data : oo.params,
			url : contextroot+oo.url,
			cache : false,
			success : function(data) {
				oo.success(data);
			},
			error : function(msg) {
				alert("Error" + JSON.stringify(msg));
			}
		});
	}
	</script>
</body>
</html>